package es.mllacer.qqsm.util;

public class HighScore implements Comparable<HighScore> {

	double longitude;
	double latitude;
	String name;
	int scoring;

	public HighScore() {
	}

	public HighScore(String name, double longitude, double latitude, int scoring) {
		this.longitude = longitude;
		this.latitude = latitude;
		this.name = name;
		this.scoring = scoring;
	}

	@Override
	public int compareTo(HighScore o) {
		if (this.getScoring() > o.getScoring()) {
			return 1;
		} else if (this.getScoring() < o.getScoring()) {
			return -1;
		} else {
			return 0;
		}
	}

	public double getLongitude() {
		return longitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}

	public double getLatitude() {
		return latitude;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getScoring() {
		return scoring;
	}

	public void setScoring(int scoring) {
		this.scoring = scoring;
	}
}
